home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / bbsutil / kbbs_40.zip / 407.KBB < prev    next >
Text File  |  1994-05-25  |  3KB  |  82 lines

  1. MAY 25, 1994
  2. KBBS Manual
  3. ANSI Control Codes
  4. KISSWARE WORKS!                        ANSI Control Codes -- 407
  5.    K|eep
  6.    I|t                            KISSWARE BULLETIN BOARD SYSTEM
  7.    S|imple                            (c) 1991-1994 by Robert Zee
  8.    S|oftware                                  All Rights Reserved
  9. ─────────────────────────────────────────────────────────────────
  10.  
  11.                       -*ANSI Control Codes*-
  12.  
  13. THIS IS AN ADVANCED FEATURE. IF YOU ARE NEW TO COMPUTERS, YOU
  14. MIGHT WANT TO SKIP THIS SECTION UNTIL YOU ARE MORE FAMILIAR WITH
  15. KBBS AND ITS OPERATION.
  16.  
  17. ANSI Control Codes, or Escape Sequences, change colors, control
  18. cursor and display location, and clear the screen.  ANSI codes
  19. include the escape character (ASCII #27), the left bracket ("["),
  20. and a character or characters that follow.  No spaces are allowed
  21. between these characters, and none is needed before of after.  If
  22. you include leading or trailing spaces, they will be displayed.
  23. If you imbed spaces between the characters, the ANSI code will
  24. fail.
  25.  
  26. Spaces are used for clarity; omit spaces when using ANSI codes.
  27. More information can be found in your DOS manual about ANSI codes
  28. and ANSI.SYS, but for purposes of KBBS and this manual, the
  29. following standard ANSI codes are used.  Esc is the escape code
  30. (ASCII #27) and n, x, y are to be replaced with numbers:
  31.  
  32. Esc [ y ; x H  (not lower case h)  move cursor to line y and col x
  33. Esc [ n A      (not lower case a)  move cursor up n lines
  34. Esc [ n B      (not lower case b)  move cursor down n lines
  35. Esc [ n C      (not lower case c)  move cursor to right n columns
  36. Esc [ n D      (not lower case d)  move cursor to left n columns
  37. Esc [ 2 J      (not lower case j)  clear screen and move cursor home
  38. Esc [ K        (not lower case k)  clear from cursor to end of line
  39.  
  40. Esc [ n m
  41. Esc [ n ; n  m
  42. Esc [ n ; n ; n m     (not a capital M)
  43. This sequence controls colors, blinking, high and low intensity.
  44. Several codes can be included when separated by a semicolon (;).
  45. Replace the n with the following number(s) for:
  46.  
  47.         0  turn off blinking, use low intensity, gray on black
  48.         1  turn on high intensity (bold)
  49.         5  turn on blinking
  50.  
  51.       Text      Color     Background
  52.  
  53.         30      Black     40
  54.         31      Red       41
  55.         32      Green     42
  56.         33      Yellow    43
  57.         34      Blue      44
  58.         35      Magenta   45
  59.         36      Cyan      46
  60.         37      White     47
  61.  
  62. Other ANSI codes are not supported by KBBS and some MODEM
  63. software.  The ANSI codes above are standard and will work with
  64. most terminal software.
  65.  
  66. Here is an example of an ANSI control code:
  67.  
  68.                <- [ 22 ; 1 H
  69.                 |_|  | | | |____ Cursor Position
  70.                  |   | | |______ Column Number
  71.                  |   | |________ Separates Numbers
  72.                  |   |__________ Line Number
  73.                  |______________ ANSI code prefix
  74.  
  75. Some text editors allow you to include the escape character in
  76. your text.  It's ASCII code is #27.  DOS allows you to type a
  77. character that is not on your keyboard by holding down the LEFT
  78. ALT KEY and typing the ASCII code on the number pad.  Notice that
  79. using the RIGHT ALT KEY won't work, and using the numbers on top
  80. of your keyboard won't work either.  When displayed on the screen,
  81. it looks like a tiny left arrow (<-).
  82.